How to determine a lists’ type, the number of items in it, and the value of specific list items